package com.dao;

import com.domain.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentDao {
 @Select("select * from student where classname like'%${_parameter}'")
  public List<Student> findAll();
 @Insert("insert into student values(${id},'${name}','${classname}',${age},'${sex}')")
  public void insert(Student student);
 @Update(" update student set name='${name}',classname='${classname}',age=${age},sex='${sex}' where id=${id}")
  public void update(Student student);
 @Delete("delete from student where id= ${id}")
 public void delete(int id);
}
